
public class Employee {
	
	private String firstName;
	private String lastName;
	private boolean employed;
	private boolean bookingAgent;
	
	private long employeeID;
	
	private boolean idSet = false; 
	
	public Employee(String firstName, String lastName, boolean isEmployed, boolean isBookingAgent) {
		this.firstName = firstName;
		this.lastName = lastName;
		employed = isEmployed;
		bookingAgent = isBookingAgent;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setEmployed(boolean employed) {
		this.employed = employed;
	}

	public boolean isEmployed() {
		return employed;
	}

	/**
	 * @param bookingAgent the bookingAgent to set
	 */
	public void setBookingAgent(boolean bookingAgent) {
		this.bookingAgent = bookingAgent;
	}

	/**
	 * @return the bookingAgent
	 */
	public boolean isBookingAgent() {
		return bookingAgent;
	}

	/**
	 * @param employeeID the employeeID to set
	 */
	public void setEmployeeID(long employeeID) {
		this.employeeID = employeeID;
		idSet = true;
	}

	/**
	 * @return the employeeID
	 */
	public long getEmployeeID() {
		return employeeID;
	}

	public boolean isIdSet() {
		return idSet;
	}
	
	@Override
	public boolean equals(Object emp) {
		if (emp instanceof Employee) {
			Employee empOther = (Employee) emp;
			
			if((empOther.firstName.equals(firstName)) && (empOther.lastName.equals(lastName))
					&& (empOther.isBookingAgent() == bookingAgent) && (empOther.isEmployed() == employed)) {
				return true;
			}
		}
		
		return false;
	}

    @Override
    public int hashCode() {
        return firstName.hashCode() ^ lastName.hashCode();
    }

}

